EMPTY =
BLANK = $(EMPTY) $(EMPTY)

target_elf = $(subst /,\,$(abspath target/thumbv7em-none-eabihf/debug/$(shell basename $(shell pwd))))
target_dep = $(target_elf).d
target_bin = $(target_elf).bin

.PHONY: clean

$(target_bin): $(target_elf)
	arm-none-eabi-objcopy -O binary $^ $@

$(target_elf):
	cargo build

-include $(target_dep)

clean:
	cargo clean
